<html lang=""><head>
        <title>API · MINA</title>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.0">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="api-network.html">
    
    
    <link rel="prev" href="../component/canvas.html">
    

    </head>
    <body>
        
<div class="book with-summary">
    <div>

    <div class="sub_nav_box">
        <div class="sub_nav_inner">
            



<ul class="top_sub_nav">

    
        
    
        <li class="sub_nav_item " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    简易教程
            
                </a>
            
        </li>
    
        <li class="sub_nav_item " data-level="1.2" data-path="../framework/MINA.html">
            
                <a href="../framework/MINA.html">
            
                    
                    框架
            
                </a>
            
        </li>
    
        <li class="sub_nav_item " data-level="1.3" data-path="../component/">
            
                <a href="../component/">
            
                    
                    组件
            
                </a>
            
        </li>
    
        <li class="sub_nav_item selected" data-level="1.4" data-path="./">
            
                <a href="./">
            
                    
                    API
            
                </a>
            
        </li>
    
        <li class="sub_nav_item " data-level="1.5" data-path="../devtools/devtools.html">
            
                <a href="../devtools/devtools.html">
            
                    
                    工具
            
                </a>
            
        </li>
    
        <li class="sub_nav_item " data-level="1.6" data-path="../qa/qa.html">
            
                <a href="../qa/qa.html">
            
                    
                    Q&amp;A
            
                </a>
            
        </li>
    

    

</ul>
     



            <!-- <h1>API</h1> -->
            <div id="book-search-input" role="search">
                <form>
                    <label for="search-input" class="search-icon" id="js-search-icon"></label>
                    <input type="text" id="search-input" name="search-input" placeholder="搜索">
                    <button type="reset" class="clear-input-btn"></button>
                </form>
            </div>
        </div>
    </div>

    <div class="book-summary">
        
            
                <nav role="navigation">
                




<ul class="summary">
                
    
        <li class="chapter  open" data-level="1.4.1" data-path="api-network.html">
            
                <a href="api-network.html">
            
                    
                    网络
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.1.1" data-path="network-request.html">
            
                <a href="network-request.html">
            
                    
                    发起请求
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.1.2" data-path="network-file.html">
            
                <a href="network-file.html">
            
                    
                    上传、下载
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.1.2.1" data-path="network-file.html">
            
                <a href="network-file.html#wxuploadfileobject">
            
                    
                    wx.uploadFile
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.1.2.2" data-path="network-file.html">
            
                <a href="network-file.html#wxdownloadfileobject">
            
                    
                    wx.downloadFile
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter  " data-level="1.4.1.3" data-path="network-socket.html">
            
                <a href="network-socket.html">
            
                    
                    WebSocket
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.1.3.1" data-path="network-socket.html">
            
                <a href="network-socket.html#wxconnectsocketobject">
            
                    
                    wx.connectSocket
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.1.3.2" data-path="network-socket.html">
            
                <a href="network-socket.html#wxonsocketopencallback">
            
                    
                    wx.onSocketOpen
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.1.3.3" data-path="network-socket.html">
            
                <a href="network-socket.html#wxonsocketerrorcallback">
            
                    
                    wx.onSocketError
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.1.3.4" data-path="network-socket.html">
            
                <a href="network-socket.html#wxsendsocketmessageobject">
            
                    
                    wx.sendSocketMessage
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.1.3.5" data-path="network-socket.html">
            
                <a href="network-socket.html#wxonsocketmessagecallback">
            
                    
                    wx.onSocketMessage
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.1.3.6" data-path="network-socket.html">
            
                <a href="network-socket.html#wxclosesocket">
            
                    
                    wx.closeSocket
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.1.3.7" data-path="network-socket.html">
            
                <a href="network-socket.html#wxonsocketclosecallback">
            
                    
                    wx.onSocketClose
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter  open" data-level="1.4.2" data-path="media-picture.html">
            
                <a href="media-picture.html">
            
                    
                    媒体
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.2.1" data-path="media-picture.html">
            
                <a href="media-picture.html">
            
                    
                    图片
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.2.1.1" data-path="media-picture.html">
            
                <a href="media-picture.html#wxchooseimageobject">
            
                    
                    wx.chooseImage
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.2.1.2" data-path="media-picture.html">
            
                <a href="media-picture.html#wxpreviewimageobject">
            
                    
                    wx.previewImage
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter  " data-level="1.4.2.2" data-path="media-record.html">
            
                <a href="media-record.html">
            
                    
                    录音
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.2.2.1" data-path="media-record.html">
            
                <a href="media-record.html#wxstartrecordobject">
            
                    
                    wx.startRecord
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.2.2.2" data-path="media-record.html">
            
                <a href="media-record.html#wxstoprecord">
            
                    
                    wx.stopRecord
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter  " data-level="1.4.2.3" data-path="media-voice.html">
            
                <a href="media-voice.html">
            
                    
                    音频播放控制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.2.3.1" data-path="media-voice.html">
            
                <a href="media-voice.html#wxplayvoiceobject">
            
                    
                    wx.playVoice
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.2.3.2" data-path="media-voice.html">
            
                <a href="media-voice.html#wxpausevoice">
            
                    
                    wx.pauseVoice
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.2.3.3" data-path="media-voice.html">
            
                <a href="media-voice.html#wxstopvoice">
            
                    
                    wx.stopVoice
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter  " data-level="1.4.2.4" data-path="media-background-audio.html">
            
                <a href="media-background-audio.html">
            
                    
                    音乐播放控制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.2.4.1" data-path="media-background-audio.html">
            
                <a href="media-background-audio.html#wxgetbackgroundaudioplayerstateobject">
            
                    
                    wx.getBackgroundAudioPlayerState
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.2.4.2" data-path="media-background-audio.html">
            
                <a href="media-background-audio.html#wxplaybackgroundaudioobject">
            
                    
                    wx.playBackgroundAudio
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.2.4.3" data-path="media-background-audio.html">
            
                <a href="media-background-audio.html#wxpausebackgroundaudio">
            
                    
                    wx.pauseBackgroundAudio
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.2.4.4" data-path="media-background-audio.html">
            
                <a href="media-background-audio.html#wxseekbackgroundaudioobject">
            
                    
                    wx.seekBackgroundAudio
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.2.4.5" data-path="media-background-audio.html">
            
                <a href="media-background-audio.html#wxstopbackgroundaudio">
            
                    
                    wx.stopBackgroundAudio
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.2.4.6" data-path="media-background-audio.html">
            
                <a href="media-background-audio.html#wxonbackgroundaudioplaycallback">
            
                    
                    wx.onBackgroundAudioPlay
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.2.4.7" data-path="media-background-audio.html">
            
                <a href="media-background-audio.html#wxonbackgroundaudiopausecallback">
            
                    
                    wx.onBackgroundAudioPause
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.2.4.8" data-path="media-background-audio.html">
            
                <a href="media-background-audio.html#wxonbackgroundaudiostopcallback">
            
                    
                    wx.onBackgroundAudioStop
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter  " data-level="1.4.2.5" data-path="file.html">
            
                <a href="file.html">
            
                    
                    文件
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.2.6" data-path="media-video.html">
            
                <a href="media-video.html">
            
                    
                    视频
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter  open" data-level="1.4.3" data-path="data.html">
            
                <a href="data.html">
            
                    
                    数据
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.3.1" data-path="data.html">
            
                <a href="data.html">
            
                    
                    数据缓存
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.3.1.1" data-path="data.html">
            
                <a href="data.html#wxsetstorageobject">
            
                    
                    wx.setStorage
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.3.1.2" data-path="data.html">
            
                <a href="data.html#wxsetstoragesynckeyvalue">
            
                    
                    wx.setStorageSync
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.3.1.3" data-path="data.html">
            
                <a href="data.html#wxgetstorageobject">
            
                    
                    wx.getStorage
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.3.1.4" data-path="data.html">
            
                <a href="data.html#wxgetstoragesynckey">
            
                    
                    wx.getStorageSync
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.3.1.5" data-path="data.html">
            
                <a href="data.html#wxclearstorage">
            
                    
                    wx.clearStorage
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.3.1.6" data-path="data.html">
            
                <a href="data.html#wxclearstoragesync">
            
                    
                    wx.clearStorageSync
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter  open" data-level="1.4.4" data-path="location.html">
            
                <a href="location.html">
            
                    
                    位置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.4.1" data-path="location.html">
            
                <a href="location.html#wxgetlocationobject">
            
                    
                    获取位置
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.4.2" data-path="location.html">
            
                <a href="location.html#wxopenlocationobject">
            
                    
                    查看位置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter  open" data-level="1.4.5" data-path="device.html">
            
                <a href="device.html">
            
                    
                    设备
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.5.1" data-path="device.html">
            
                <a href="device.html#wxgetnetworktypeobject">
            
                    
                    网络状态
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.5.2" data-path="device.html">
            
                <a href="device.html#wxgetsysteminfoobject">
            
                    
                    系统信息
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.5.3" data-path="device.html">
            
                <a href="device.html#wxonaccelerometerchangecallback">
            
                    
                    重力感应
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.5.4" data-path="device.html">
            
                <a href="device.html#wxoncompasschangecallback">
            
                    
                    罗盘
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter  open" data-level="1.4.6" data-path="ui.html">
            
                <a href="ui.html">
            
                    
                    界面
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.6.1" data-path="ui.html">
            
                <a href="ui.html">
            
                    
                    设置导航条
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.6.2" data-path="ui-navigate.html">
            
                <a href="ui-navigate.html">
            
                    
                    导航
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.6.3" data-path="api-animation.html">
            
                <a href="api-animation.html">
            
                    
                    动画
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.6.4" data-path="api-canvas.html">
            
                <a href="api-canvas.html">
            
                    
                    绘图
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.6.5" data-path="ui-other.html">
            
                <a href="ui-other.html">
            
                    
                    其他
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter  open" data-level="1.4.7" data-path="api-login.html">
            
                <a href="api-login.html">
            
                    
                    开放接口
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.7.1" data-path="api-login.html">
            
                <a href="api-login.html">
            
                    
                    登录
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.7.1.1" data-path="signature.html">
            
                <a href="signature.html">
            
                    
                    签名加密
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter  " data-level="1.4.7.2" data-path="open.html">
            
                <a href="open.html">
            
                    
                    用户信息
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.7.3" data-path="api-pay.html">
            
                <a href="api-pay.html">
            
                    
                    微信支付
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.7.4" data-path="notice.html">
            
                <a href="notice.html">
            
                    
                    模板消息
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter  " data-level="1.4.7.4.1" data-path="notice.html">
            
                <a href="notice.html#使用说明">
            
                    
                    使用说明
            
                </a>
            

            
        </li>
    
        <li class="chapter  " data-level="1.4.7.4.2" data-path="notice.html">
            
                <a href="notice.html#接口说明">
            
                    
                    接口说明
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
<!--                     

<div class="book-header" role="navigation">
    
</div>


 -->

                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="api">API</h1><p>MINA提供丰富的微信原生API，可以方便的调起微信提供的能力，如获取用户信息，本地存储，支付功能等。</p><p><strong>说明：</strong></p><ul><li>wx.on开头的API是监听某个事件发生的API接口，接受一个CALLBACK函数作为参数。当该事件触发时，会调用CALLBACK函数。
</li>
<li>如未特殊约定，其他API接口都接受一个OBJECT作为参数。
</li>
<li>OBJECT中可以指定success,fail,complete来接收接口调用结果。
</li></ul>
<table>
<thead>
<tr><th>参数名</th>
<th>类型</th>
<th>必填</th>
<th>说明</th>
</tr></thead><tbody>
<tr><td>success</td>
<td>Function</td>
<td>否</td>
<td>接口调用成功的回调函数</td>
</tr><tr><td>fail</td>
<td>Function</td>
<td>否</td>
<td>接口调用失败的回调函数</td>
</tr><tr><td>complete</td>
<td>Function</td>
<td>否</td>
<td>接口调用结束的回调函数（调用成功、失败都会执行）</td>
</tr></tbody></table>

<p><strong>API列表：</strong></p><p><strong>网络API列表：</strong></p><table>
<thead>
<tr><th>API</th>
<th>说明</th>
</tr></thead><tbody>
<tr><td><a href="network-request.html">wx.request</a></td>
<td>发起网络请求</td>
</tr><tr><td><a href="network-file.html#wxuploadfileobject">wx.uploadFile</a></td>
<td>上传文件</td>
</tr><tr><td><a href="network-file.html#wxdownloadfileobject">wx.downloadFile</a></td>
<td>下载文件</td>
</tr><tr><td><a href="network-socket.html#wxconnectsocketobject">wx.connectSocket</a></td>
<td>创建WebSocket连接</td>
</tr><tr><td><a href="network-socket.html#wxonsocketopencallback">wx.onSocketOpen</a></td>
<td>监听WebSocket打开</td>
</tr><tr><td><a href="network-socket.html#wxonsocketerrorcallback">wx.onSocketError</a></td>
<td>监听WebSocket错误</td>
</tr><tr><td><a href="network-socket.html#wxsendsocketmessageobject">wx.sendSocketMessage</a></td>
<td>发送WebSocket消息</td>
</tr><tr><td><a href="network-socket.html#wxonsocketmessagecallback">wx.onSocketMessage</a></td>
<td>接受WebSocket消息</td>
</tr><tr><td><a href="network-socket.html#wxclosesocket">wx.closeSocket</a></td>
<td>关闭WebSocket连接</td>
</tr><tr><td><a href="network-socket.html#wxonsocketclosecallback">wx.onSocketClose</a></td>
<td>监听WebSocket关闭</td>
</tr></tbody></table>

<p><strong>媒体API列表：</strong></p><table>
<thead>
<tr><th>API</th>
<th>说明</th>
</tr></thead><tbody>
<tr><td><a href="media-picture.html#wxchooseimageobject">wx.chooseImage</a></td>
<td>从相册选择图片，或者拍照</td>
</tr><tr><td><a href="media-picture.html#wxpreviewimageobject">wx.previewImage</a></td>
<td>预览图片</td>
</tr><tr><td><a href="media-record.html#wxstartrecordobject">wx.startRecord</a></td>
<td>开始录音</td>
</tr><tr><td><a href="media-record.html#wxstoprecord">wx.stopRecord</a></td>
<td>结束录音</td>
</tr><tr><td><a href="media-voice.html#wxplayvoice">wx.playVoice</a></td>
<td>播放语音</td>
</tr><tr><td><a href="media-voice.html#wxpausevoice">wx.pauseVoice</a></td>
<td>暂停播放语音</td>
</tr><tr><td><a href="media-voice.html#wxstopvoice">wx.stopVoice</a></td>
<td>结束播放语音</td>
</tr><tr><td><a href="media-background-audio.html#wxgetbackgroundaudioplayerstateobject">wx.getBackgroundAudioPlayerState</a></td>
<td>获取音乐播放状态</td>
</tr><tr><td><a href="media-background-audio.html#wxplaybackgroundaudioobject">wx.playBackgroundAudio</a></td>
<td>播放音乐</td>
</tr><tr><td><a href="media-background-audio.html#wxpausebackgroundaudio">wx.pauseBackgroundAudio</a></td>
<td>暂停播放音乐</td>
</tr><tr><td><a href="media-background-audio.html#wxstopbackgroundaudio">wx.seekBackgroundAudio</a></td>
<td>控制音乐播放进度</td>
</tr><tr><td><a href="media-background-audio.html#wxstopbackgroundaudio">wx.stopBackgroundAudio</a></td>
<td>停止播放音乐</td>
</tr><tr><td><a href="media-background-audio.html#wxonbackgroundaudioplaycallback">wx.onBackgroundAudioPlay</a></td>
<td>监听音乐开始播放</td>
</tr><tr><td><a href="media-background-audio.html#wxonbackgroundaudiopausecallback">wx.onBackgroundAudioPause</a></td>
<td>监听音乐暂停</td>
</tr><tr><td><a href="media-background-audio.html#wxonbackgroundaudiostopcallback">wx.onBackgroundAudioStop</a></td>
<td>监听音乐结束</td>
</tr><tr><td><a href="media-video.html">wx.chooseVideo</a></td>
<td>从相册选择视频，或者拍摄</td>
</tr><tr><td><a href="file.html">wx.saveFile</a></td>
<td>保存文件</td>
</tr></tbody></table>

<p><strong>数据API列表：</strong></p><table>
<thead>
<tr><th>API</th>
<th>说明</th>
</tr></thead><tbody>
<tr><td><a href="api-data.md#wxgetstorageobject">wx.getStorage</a></td>
<td>获取本地数据缓存</td>
</tr><tr><td><a href="api-data.md#wxsetstorageobject">wx.setStorage</a></td>
<td>设置本地数据缓存</td>
</tr><tr><td><a href="api-data.md#wxclearstorageobject">wx.clearStorage</a></td>
<td>清理本地数据缓存</td>
</tr></tbody></table>

<p><strong>位置API列表：</strong></p><table>
<thead>
<tr><th>API</th>
<th>说明</th>
</tr></thead><tbody>
<tr><td><a href="location.html#wxgetlocationobject">wx.getLocation</a></td>
<td>获取当前位置</td>
</tr><tr><td><a href="location.html#wxopenlocationobject">wx.openLocation</a></td>
<td>打开内置地图</td>
</tr></tbody></table>

<p><strong>设备API列表：</strong></p><table>
<thead>
<tr><th>API</th>
<th>说明</th>
</tr></thead><tbody>
<tr><td><a href="device.html#wxgetnetworktypeobject">wx.getNetworkType</a></td>
<td>获取网络类型</td>
</tr><tr><td><a href="device.html#wxgetsysteminfoobject">wx.getSystemInfo</a></td>
<td>获取系统信息</td>
</tr><tr><td><a href="device.html#wxonaccelerometerchangecallback">wx.onAccelerometerChange</a></td>
<td>监听重力感应数据</td>
</tr><tr><td><a href="device.html#wxoncompasschangecallback">wx.onCompassChange</a></td>
<td>监听罗盘数据</td>
</tr></tbody></table>

<p><strong>界面API列表：</strong></p><table>
<thead>
<tr><th>API</th>
<th>说明</th>
</tr></thead><tbody>
<tr><td><a href="ui.html#wxsetnavigationbartitleobject">wx.setNavigationBarTitle</a></td>
<td>设置当前页面标题</td>
</tr><tr><td><a href="ui.html#wxshownavigationbarloading">wx.showNavigationBarLoading</a></td>
<td>显示导航条加载动画</td>
</tr><tr><td><a href="ui.html#wxhidenavigationbarloading">wx.hideNavigationBarLoading</a></td>
<td>隐藏导航条加载动画</td>
</tr><tr><td><a href="ui-navigate.html#wxnavigatetoobject">wx.navigateTo</a></td>
<td>新窗口打开页面</td>
</tr><tr><td><a href="ui-navigate.html#wxredirecttoobject">wx.redirectTo</a></td>
<td>原窗口打开页面</td>
</tr><tr><td><a href="ui-navigate.html#wxnavigateback">wx.navigateBack</a></td>
<td>退回上一个页面</td>
</tr><tr><td><a href="api-animation.html">wx.createAnimation</a></td>
<td>动画</td>
</tr><tr><td><a href="api-canvas.html#wxcreatecontext">wx.createContext</a></td>
<td>创建绘图上下文</td>
</tr><tr><td><a href="api-canvas.html#wxdrawcanvasobject">wx.drawCanvas</a></td>
<td>绘图</td>
</tr><tr><td><a href="ui-other.html#wxhidekeyboard">wx.hideKeyboard</a></td>
<td>隐藏键盘</td>
</tr><tr><td><a href="ui-other.html#wxstoppulldownrefresh">wx.stopPullDownRefresh</a></td>
<td>停止下拉刷新动画</td>
</tr></tbody></table>

<p><strong>开放接口：</strong></p><table>
<thead>
<tr><th>API</th>
<th>说明</th>
</tr></thead><tbody>
<tr><td><a href="api-login.html">wx.login</a></td>
<td>登录</td>
</tr><tr><td><a href="open.html#wxgetuserinfoobject">wx.getUserInfo</a></td>
<td>获取用户信息</td>
</tr><tr><td><a href="api-pay.html#wxrequestpaymentobject">wx.requestPayment</a></td>
<td>发起微信支付</td>
</tr></tbody></table>


                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class="search-results-count"></span> 个结果 "<span class="search-query"></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">没有找到相关内容 "<span class="search-query"></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                    <div class="foot" id="footer">
                        <ul class="links ft">
                            <li class="links_item"><a href="">关于腾讯</a></li>
                            <li class="links_item"><a href="">服务协议</a></li>
                            <li class="links_item"><a href="">运营规范</a></li>
                            <li class="links_item"><a href="">辟谣中心</a></li>
                            <li class="links_item"><a href="">客服中心</a></li>
                            <li class="links_item"><a href="">联系邮箱</a></li>
                            <li class="links_item"><a href="">侵权投诉</a></li>
                            <li class="links_item">
                                <p class="copyright">Copyright © 2012-<span id="s_copyright_year"></span> Tencent. All Rights Reserved.</p>
                            </li>
                        </ul>
                    </div>
                
            </div>

            
                
                <a href="../component/canvas.html#canvas" class="navigation navigation-prev " aria-label="Previous page: canvas">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="api-network.html" class="navigation navigation-next " aria-label="Next page: 网络">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
   

</div></body></html>